package com.title8;

import java.io.*;
import java.util.HashSet;

/**
* @Author  milian
* @Date 2021/8/3 0003 9:10
*/
public class title8 {
    public static void main(String[] args) throws IOException {
        String[] s = {"张三","李四","王五","赵六","前妻"};
        File file = new File("D:\\homework");
        File[] files = file.listFiles();
        HashSet<String> hashSet = new HashSet<>();
        for (File file1 : files) {
            String[] split = file1.getName().split(".");
            hashSet.add(split[0]);
        }
        for (String name: s
             ) {
            if (!hashSet.contains(name)){
                System.out.println(name+"没有交作业");
            }
        }
    }
}
